# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=libimobiledevice
pkgver=1.3.0
pkgrel=3
pkgdesc="Library that talks iPhone and iPod Touch protocols on Linux"
url="https://libimobiledevice.org"
arch="all"
license="LGPL-2.1-or-later"
makedepends="openssl1.1-compat-dev libusbmuxd-dev libplist-dev python3-dev cython"
subpackages="$pkgname-dev $pkgname-doc $pkgname-progs $pkgname-python"
source="https://github.com/libimobiledevice/libimobiledevice/releases/download/$pkgver/libimobiledevice-$pkgver.tar.bz2"

build() {
	./configure \
		--prefix=/usr \
		--disable-static \
		PYTHON=/usr/bin/python3
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

progs() {
	pkgdesc="Tools that talks iPhone and iPod Touch devices' protocols on Linux"
	depends=""
	amove usr/bin
}

python() {
	pkgdesc="python3 bindings for libimobiledevice"
	depends=""
	amove usr/lib/python3*
}

sha512sums="7b22040552a6561729c79c0846f571b0e608abb7c297567d2ecfdd1718ce86df08a5e34ba51f209bdee96a1917da15e7ba3aaef1d289a951d1d3470b1f89e6a8  libimobiledevice-1.3.0.tar.bz2"
